package com.huawei.appgallery.forum.cards.node;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.LinearLayout;
import com.huawei.appgallery.forum.base.card.ForumNode;
import com.huawei.appgallery.forum.cards.card.ForumHotSpotCard;
import com.huawei.appgallery.foundation.ui.framework.widget.Space;
import o.azb;
import o.bsy.b;
import o.bsy.c;
import o.bsy.e;
import o.cih;

public class ForumHotSpotNode extends ForumNode {
    public ForumHotSpotNode(Context context) {
        super(context);
    }

    public boolean ॱ() {
        return true;
    }

    public boolean ˊ(ViewGroup viewGroup, ViewGroup viewGroup2) {
        int i = 0;
        LayoutInflater from = LayoutInflater.from(this.ॱ);
        LinearLayout linearLayout = (LinearLayout) from.inflate(b.ˊॱ, null);
        linearLayout.setPadding(azb.ˊ(this.ॱ), 0, azb.ˊ(this.ॱ), 0);
        LinearLayout linearLayout2 = (LinearLayout) linearLayout.findViewById(c.ᐝ);
        int ˏ = ˏ();
        LayoutParams layoutParams = new LinearLayout.LayoutParams(this.ॱ.getResources().getDimensionPixelSize(e.ॱˎ), -1);
        while (i < ˏ) {
            View inflate = from.inflate(b.ॱॱ, null);
            cih ˋ = ˋ(this.ॱ);
            ˋ.ˏ(inflate);
            ˊ(ˋ);
            linearLayout2.addView(inflate);
            if (i < ˏ - 1) {
                linearLayout2.addView(new Space(this.ॱ), layoutParams);
            }
            i++;
        }
        viewGroup.addView(linearLayout);
        return true;
    }

    protected ForumHotSpotCard ˋ(Context context) {
        return new ForumHotSpotCard(context);
    }
}
